<template>
    <div class="as">
       <el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
  <el-radio-button :label="false">展开</el-radio-button>
  <el-radio-button :label="true">收起</el-radio-button>
</el-radio-group>
<el-menu default-active="1-4-1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" :collapse="isCollapse">
<h4> <el-image
      style="width: 50px; height: 50px"
      src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
      ></el-image> 
         <span slot="title">imooc-admin</span>
     </h4>
      <el-menu-item index="4">
    <i class="el-icon-setting"></i>
    <span slot="title">个人中心</span>
  </el-menu-item>
      <el-menu-item index="4">
    <i class="el-icon-setting"></i>
    <span slot="title">数据可视化</span>
  </el-menu-item>
    

  <el-submenu index="1">
    <template slot="title">
      <i class="el-icon-location"></i>
      <span slot="title">用户</span>
    </template>
    <el-menu-item-group>
      <el-menu-item index="1-1">员工管理</el-menu-item>
      <el-menu-item index="1-2">角色管理</el-menu-item>
      <el-menu-item index="1-2">权限管理</el-menu-item>
    </el-menu-item-group>
  </el-submenu>

  <el-submenu index="2">
    <template slot="title">
      <i class="el-icon-location"></i>
      <span slot="title">文章</span>
    </template>
    <el-menu-item-group>
      <el-menu-item index="2-1">文章排名</el-menu-item>
      <el-menu-item index="2-2">创建文章</el-menu-item>
    </el-menu-item-group>
  </el-submenu>

</el-menu>

    </div>
</template>
<script>
  export default {
    data() {
      return {
        isCollapse: true
      };
    },
    methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      }
    }
  }
</script>
<style scoped>
.el-menu-vertical-demo:not(.el-menu--collapse) {
    width: 200px;
    min-height: 400px;
  }
  .el-menu{
    margin: 0;
    padding: 0;
    background-color: rgb(57, 67, 85);
    height: 2000px;
  }
  .el-menu-item-group{
    color: white;
    background-color: rgb(57, 67, 85);
  }
  .el-menu-item{
    color: white;
  }
  span{
    color: white;
  }
  .el-radio-group {
    background-color: rgb(57, 67, 85);
    margin: 0;
    padding: 0;

  }
</style>